import request from "@/utils/request";
import pathname from "./pathname";

// 获取菜单列表   1季度  2年度
export function getHomepageList(type) {
  return request({
    url: pathname.homepageList,
    method: "get",
    params: {
      assessType: type
    },
    _hasLoading: true
  });
}

export function uploadFile(data) {
  return request({
    url: pathname.fileUpload,
    method: "post",
    headers: {
      "Content-Type": "multipart/form-data"
    },
    data,
    _hasLoading: true
  });
}

// 获取字典
export function getDictionaryByType(type) {
  return request({
    url: pathname.getDictionaryByType.replace(/{type}/g, type),
    method: "GET",
    _hasLoading: true
  });
}
